<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="format-detection" content="telephone=no"/>
	<title>新华保险培训微平台</title>
	<link rel="stylesheet" href="../css/lt_common.css">
	<link rel="stylesheet" href="../css/ranking_list.css">
	<link rel="stylesheet" href="../css/newpublish.css">
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script src="../js/jquery.js"></script>
	<script src="../js/common.js"></script>
	<script src="../js/weixin.js"></script>
	<script src="../js/teacherclub/status_detial.js"></script>
</head>
<body>
	<div class="page">
		<div class="main_content new">
			<!-- 发布课件PDF -->
			<!-- <div class="head_content">
				<img src="../img/default.png" alt="">
				<h3>新华保险培训部</h3>
				<p>5分钟前</p>
			</div>
			<p class="article clear">理财+保障，小小投入，轻松理财！</p>
			<div class="pdf_content">
				<img class="pdf_img" src="../img/icon-pdf22.png" alt="">
				<h3>新华最新培训教程 第三版 中文版PDF.pdf</h3>
			</div> -->
		</div>
		<div class="show_window">
			<span><i class="share"></i><em>0</em></span>
			<span><i class="say"></i><em>0</em></span>
			<span class="wellshow"><i class="well"></i><em>0</em></span>
			<!-- <span class="talk"><i class="sa"></i>赞<em>0</em></span> -->
		</div>
		<!-- <p class="title_say talk_num">
			评论<em>0</em>
		</p>
		<span class="arrow"></span> -->
		<div class="palce talk">
			<div class="ourtalk_content">
				<!-- <div class="items">
					<img src="../img/default.png" alt="">
					<h3 class="talk_name">张浩</h3>
					<p class="time">01-05 10:40</p>
					<p class="clear">一份投入得两份保障，实在是太实惠了！</p>
				</div> -->
			</div>
		</div>
		<!-- <div class="operate_area">
			<ul>
				<li class="share_btn"><i class="share"></i>分享</li>
				<li class="say_btn"><i class="say"></i>评论</li>
				<li class="well_btn"><i class="well"></i>赞</li>
			</ul>
		</div> -->
	</div>
	<div class="share_mask">
		<img src="../img/hand.png" alt="">
	</div>
	<div class="talk_mask">
		<div class="discuss_content">
			<div id="star">
			    <span>评分</span>
			    <ul class="store">
			        <li class=""><a href="javascript:;">1</a></li>
			        <li class=""><a href="javascript:;">2</a></li>
			        <li class=""><a href="javascript:;">3</a></li>
			        <li class=""><a href="javascript:;">4</a></li>
			        <li class=""><a href="javascript:;">5</a></li>
			    </ul>
			</div>
			<textarea name="discuss" id="discuss"  minlength=6 maxlength=100 placeholder="发表个评论..."></textarea>
			<div class="btn_content">
				<input type="button" class="cancle" value="取消">
				<input type="button" class="push" id="push" value="发送">
			</div>
		</div>
	</div>
	<div class="mask">
		<div class="confirm_div">
			<p>请先认证后再进行评论</p>
			<div class="button_content">
				<input class="cancel" type="button" value="取消">
				<input class="ok" type="button" value="好的">
			</div>	
		</div>
	</div>
</body>
</html>
<script>
	$(function(){
		itemsFun();
		itemsDetialFun();
		
		
		//分享
		$('.show_window span:first-child').on('click',function(){
			$('.share_mask').show();
			// shareFun();
		});
		$('.share_mask').on('click',function(){
			$(this).hide();
		});

		//赞
		$('.show_window span:last-child').on('click',function(){
			if ($(this).hasClass('welldone')) {
				cancelFun();
			}else {
				wellDoneFun();	
			}
		});

		//评论
		$('.show_window span:nth-child(2)').on('click',function(){
			if(user_status=='3'){
					$('.mask').fadeIn('fast', function() {
						$('.confirm_div').slideDown('fast');
					});
					$('.cancel').on('click',function() {
						$('.mask').fadeOut('fast', function() {
							$('.confirm_div').slideUp('fast');
						});
					});
					$('.ok').on('click',function() {
						$('.mask').fadeOut('fast', function() {
							$('.confirm_div').slideUp('fast');
						});
						window.location = '../validate.html?openid='+openid+"&currid="+detialId+'&user_status='+user_status+'&state=2';
					});
					
				return;
			}
			$('.talk_mask').show();
		});
		$('.cancle').on('click',function(){
			$('.talk_mask').hide();
		});
		$('.push').on('click',function(){
			talkFun();
		});
		//星评
		var oStar = document.getElementById("star");
		var aLi = oStar.getElementsByTagName("li");
		var oUl = oStar.getElementsByTagName("ul")[0];
		var i = iScore = iStar = 0;
		
		for (i = 1; i <= aLi.length; i++)
		{
			aLi[i - 1].index = i;
			//鼠标移过显示分数
			aLi[i - 1].onmouseover = function ()
			{
				fnPoint(this.index);
			};
			//鼠标离开后恢复上次评分
			aLi[i - 1].onmouseout = function ()
			{
				fnPoint();
				//关闭浮动层
			};
			//点击后进行评分处理
			aLi[i - 1].onclick = function ()
			{
				iStar = this.index;
			}
		}
		//评分处理
		function fnPoint(iArg)
		{
			//分数赋值
			iScore = iArg || iStar;
			for (i = 0; i < aLi.length; i++) aLi[i].className = i < iScore ? "on" : "";	
		}
		
	});
</script>